package com.ryan.util;

import java.util.regex.Pattern;

public class EmailRegexUtil {

	public static void main(String[] args) {
		String mail = "ad@163.com";
		String regex = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
		Pattern pattern = Pattern.compile(regex);
		boolean bFlag = pattern.matches(regex, mail);
		if(bFlag){
			System.out.println("fasdfafsd");
		}else{
			System.out.println("3333");
		}
	}
}
